package cn.itcast.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @author 虎哥
 */
//@EnableCircuitBreaker
//@SpringBootApplication

// 启用feign的客户端功能，扫描client所在的包
@EnableFeignClients/*(basePackages = "cn.itcast.consumer.client")*/
@SpringCloudApplication
public class ConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class, args);
    }

    /**
     * 注入RestTemplate到Spring容器
     * @return RestTemplate对象
     */
   /* @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
*/
    /*@Bean
    public IRule iRule(){
        return new RandomRule();
    }*/
}
